let Home = () => import("../views/home.vue");

const basicRoutes = [
  {
    path: "/",
    component: () => import("../views/Index"),
  },
  {
    path: "/login",
    component: () => import("../views/Login"),
  },
  {
    path: "/reg",
    component: () => import("../views/Reg"),
  },
  {
    path: "/product",
    component: () => import("../views/Product"),
  },
  {
    path: "/product/detail",
    component: () => import("../views/ProductDetail"),
  },
  {
    path: "/search",
    name: "search",
    title: "首页",
    redirect: "",
    component: () => import("../views/search.vue"),
  },
  {
    path: "/demo",
    name: "demo",
    title: "样例",
    redirect: "/demo/demo1",
    component: Home,
    children: [
      {
        path: "demo1",
        name: "demo1",
        title: "样例1",
        component: () => import("../views/demo/demo1.vue"),
      },
    ],
  },
];

export default basicRoutes;
